package com.lewei.view;

import java.awt.Font;
import java.awt.Toolkit;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.WindowEvent;
import java.awt.event.WindowFocusListener;
import java.util.List;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.JSeparator;

import com.lewei.dao.SqliteDao;
import com.lewei.model.Adjustment;
import javax.swing.JScrollPane;
import javax.swing.JSplitPane;

/**
 * 调整标签位置。
 * 
 */
public class AdjustLabelPositionView extends JFrame {
	private static final long serialVersionUID = -7274259983815728490L;
	private static AdjustLabelPositionView alp = null;
	 private static JTextField _80340E_top;
	 private static JTextField _80340E_left;
	 private static JTextField _80340_top;
	 private static JTextField _80340_left;
	// private static JTextField _900540E_top;
	// private static JTextField _900540E_left;
	// private static JTextField _900540_top;
	// private static JTextField _900540_left;
	private static JTextField _80420_top;
	private static JTextField _80420_left;
	// private static JTextField OL35CN_left;
	// private static JTextField OL35CN_top;
	// private static JTextField _1018300E_top;
	// private static JTextField _1018300E_left;
	// private static JTextField _1018300_top;
	// private static JTextField _1018300_left;
	private static JTextField _SGB_top;
	private static JTextField _SGB_left;
	private static JTextField _SGB05_top;
	private static JTextField _SGB05_left;
	private static JTextField _SGB05CN_top;
	private static JTextField _SGB05CN_left;
	private static JTextField _OL35SCHINDLER_top;
	private static JTextField _OL35SCHINDLER_left;
	private static JTextField _OL35SCHINDLERCN_top;
	private static JTextField _OL35SCHINDLERCN_left;

	public static void main(String[] args) {
		alp = new AdjustLabelPositionView();
		alp.setVisible(true);
	}

	public static AdjustLabelPositionView GetAdjustLabelPositionView() {
		if (alp == null) {
			alp = new AdjustLabelPositionView();
		}
		// 更新标签信息。
		try {
			updatePosition();
			// updateFontSize();
		} catch (Exception e) {
			e.printStackTrace();
			JOptionPane.showMessageDialog(null, e.getMessage());
		}
		return alp;
	}

	private AdjustLabelPositionView() {
		double screenWidth = Toolkit.getDefaultToolkit().getScreenSize()
				.getWidth();
		double screenHeight = Toolkit.getDefaultToolkit().getScreenSize()
				.getHeight();
		setBounds((int) ((screenWidth - 400) / 2),
				(int) ((screenHeight - 400) / 2), 400, 400);
		// 不可改变窗口大小
		setResizable(false);
		// 设置图标
		setIconImage(Toolkit.getDefaultToolkit().getImage(
				MainPrint.class.getResource("/images/Wittur_Logo.gif")));
		// 设置标题
		setTitle("标签调整");
		getContentPane().setLayout(null);

		JLabel label = new JLabel("\u4E0A\u8FB9\u8DDD");// 上边距
		label.setHorizontalAlignment(SwingConstants.CENTER);
		label.setFont(new Font("SimSun", Font.PLAIN, 12));
		label.setBounds(139, 10, 65, 15);
		getContentPane().add(label);

		JLabel label_1 = new JLabel("\u5DE6\u8FB9\u8DDD");// 下边距
		label_1.setHorizontalAlignment(SwingConstants.CENTER);
		label_1.setFont(new Font("SimSun", Font.PLAIN, 12));
		label_1.setBounds(259, 10, 66, 15);
		getContentPane().add(label_1);

		JButton button = new JButton("\u63D0\u4EA4");// 提交
		button.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent e) {

				try {
					 String _80340E_top_str =
					 _80340E_top.getText().toString().trim().isEmpty() ? "0"
					 : _80340E_top.getText().toString();
					 String _80340E_lef_str =
					 _80340E_left.getText().toString().trim().isEmpty() ? "0"
					 : _80340E_left.getText().toString();
					//
					 String _80340_top_str =
					 _80340_top.getText().toString().trim().isEmpty() ? "0"
					 : _80340_top.getText().toString();
					 String _80340_lef_str =
					 _80340_left.getText().toString().trim().isEmpty() ? "0"
					 : _80340_left.getText().toString();
					//
					// String _900540_top_str =
					// _900540_top.getText().toString().trim().isEmpty() ? "0"
					// : _900540_top.getText().toString();
					// String _900540_lef_str =
					// _900540_left.getText().toString().trim().isEmpty() ? "0"
					// : _900540_left.getText().toString();
					// String _900540E_top_str =
					// _900540E_top.getText().toString().trim().isEmpty() ? "0"
					// : _900540E_top.getText().toString();
					// String _900540E_lef_str =
					// _900540E_left.getText().toString().trim().isEmpty() ? "0"
					// : _900540E_left.getText().toString();
					String _80420_top_str = _80420_top.getText().toString()
							.trim().isEmpty() ? "0" : _80420_top.getText()
							.toString();
					String _80420_lef_str = _80420_left.getText().toString()
							.trim().isEmpty() ? "0" : _80420_left.getText()
							.toString();
					// String OL35CN_top_str =
					// OL35CN_top.getText().toString().trim().isEmpty() ? "0"
					// : OL35CN_top.getText().toString();
					// String OL35CN_lef_str =
					// OL35CN_left.getText().toString().trim().isEmpty() ? "0"
					// : OL35CN_left.getText().toString();
					// String _1018300E_top_str =
					// _1018300E_top.getText().toString().trim().isEmpty() ? "0"
					// : _1018300E_top.getText().toString();
					// String _1018300E_lef_str =
					// _1018300E_left.getText().toString().trim().isEmpty() ?
					// "0"
					// : _1018300E_left.getText().toString();
					// String _1018300_top_str =
					// _1018300_top.getText().toString().trim().isEmpty() ? "0"
					// : _1018300_top.getText().toString();
					// String _1018300_lef_str =
					// _1018300_left.getText().toString().trim().isEmpty() ? "0"
					// : _1018300_left.getText().toString();
					String _SGB_top_str = _SGB_top.getText().toString().trim()
							.isEmpty() ? "0" : _SGB_top.getText().toString();
					String _SGB_lef_str = _SGB_left.getText().toString().trim()
							.isEmpty() ? "0" : _SGB_left.getText().toString();
					String _SGB05_top_str = _SGB05_top.getText().toString()
							.trim().isEmpty() ? "0" : _SGB05_top.getText()
							.toString();
					String _SGB05_lef_str = _SGB05_left.getText().toString()
							.trim().isEmpty() ? "0" : _SGB05_left.getText()
							.toString();
					String _SGB05CN_top_str = _SGB05CN_top.getText().toString()
							.trim().isEmpty() ? "0" : _SGB05CN_top.getText()
							.toString();
					String _SGB05CN_lef_str = _SGB05CN_left.getText()
							.toString().trim().isEmpty() ? "0" : _SGB05CN_left
							.getText().toString();
					String _OL35SCHINDLER_top_str = _OL35SCHINDLER_top
							.getText().toString().trim().isEmpty() ? "0"
							: _OL35SCHINDLER_top.getText().toString();
					String _OL35SCHINDLER_lef_str = _OL35SCHINDLER_left
							.getText().toString().trim().isEmpty() ? "0"
							: _OL35SCHINDLER_left.getText().toString();
					String _OL35SCHINDLERCN_top_str = _OL35SCHINDLERCN_top
							.getText().toString().trim().isEmpty() ? "0"
							: _OL35SCHINDLERCN_top.getText().toString();
					String _OL35SCHINDLERCN_lef_str = _OL35SCHINDLERCN_left
							.getText().toString().trim().isEmpty() ? "0"
							: _OL35SCHINDLERCN_left.getText().toString();

					SqliteDao sd = new SqliteDao();
					// 提交新的边距
					Adjustment adjustment = new Adjustment();
					 adjustment.setName("80340E");
					 adjustment.setLeft(Double.parseDouble(_80340E_lef_str));
					 adjustment.setTop(Double.parseDouble(_80340E_top_str));
					 if (!sd.setPosition(adjustment)) {
					 JOptionPane.showMessageDialog(null,
					 "80340E无法更新标签的位置数据！");
					 return;
					 }
					 adjustment.setName("80340");
					 adjustment.setLeft(Double.parseDouble(_80340_lef_str));
					 adjustment.setTop(Double.parseDouble(_80340_top_str));
					 if (!sd.setPosition(adjustment)) {
					 JOptionPane.showMessageDialog(null, "80340无法更新标签的位置数据！");
					 return;
					 }
					// adjustment.setName("900540E");
					// adjustment.setLeft(Double.parseDouble(_900540E_lef_str));
					// adjustment.setTop(Double.parseDouble(_900540E_top_str));
					// if (!sd.setPosition(adjustment)) {
					// JOptionPane.showMessageDialog(null,
					// "900540E无法更新标签的位置数据！");
					// return;
					// }
					// adjustment.setName("900540");
					// adjustment.setLeft(Double.parseDouble(_900540_lef_str));
					// adjustment.setTop(Double.parseDouble(_900540_top_str));
					// if (!sd.setPosition(adjustment)) {
					// JOptionPane.showMessageDialog(null,
					// "900540无法更新标签的位置数据！");
					// return;
					// }
					adjustment.setName("OL35");
					adjustment.setLeft(Double.parseDouble(_80420_lef_str));
					adjustment.setTop(Double.parseDouble(_80420_top_str));
					System.out.println("_80420_top_str:" + _80420_top_str);
					System.out.println("_80420_lef_str:" + _80420_lef_str);
					if (!sd.setPosition(adjustment)) {
						JOptionPane
								.showMessageDialog(null, "80420无法更新标签的位置数据！");
						return;
					}
					adjustment.setName("SGB");
					adjustment.setLeft(Double.parseDouble(_SGB_lef_str));
					adjustment.setTop(Double.parseDouble(_SGB_top_str));
					System.out.println("_SGB_top_str:" + _SGB_top_str);
					System.out.println("_SGB_lef_str:" + _SGB_lef_str);
					if (!sd.setPosition(adjustment)) {
						JOptionPane.showMessageDialog(null, "SGB无法更新标签的位置数据！");
						return;
					}
					adjustment.setName("SGB05");
					adjustment.setLeft(Double.parseDouble(_SGB05_lef_str));
					adjustment.setTop(Double.parseDouble(_SGB05_top_str));
					System.out.println("_SGB05_top_str:" + _SGB05_top_str);
					System.out.println("_SGB05_lef_str:" + _SGB05_lef_str);
					if (!sd.setPosition(adjustment)) {
						JOptionPane
								.showMessageDialog(null, "SGB05无法更新标签的位置数据！");
						return;
					}
					adjustment.setName("SGB05CN");
					adjustment.setLeft(Double.parseDouble(_SGB05CN_lef_str));
					adjustment.setTop(Double.parseDouble(_SGB05CN_top_str));
					System.out.println("_SGB05CN_top_str:" + _SGB05_top_str);
					System.out.println("_SGB05CN_lef_str:" + _SGB05_lef_str);
					if (!sd.setPosition(adjustment)) {
						JOptionPane.showMessageDialog(null,
								"SGB05CN无法更新标签的位置数据！");
						return;
					}
					adjustment.setName("OL35SCHINDLER");
					adjustment.setLeft(Double.parseDouble(_OL35SCHINDLER_lef_str));
					adjustment.setTop(Double.parseDouble(_OL35SCHINDLER_top_str));
					System.out.println("_OL35SCHINDLER_top_str:" + _OL35SCHINDLER_top_str);
					System.out.println("_OL35SCHINDLER_lef_str:" + _OL35SCHINDLER_lef_str);
					if (!sd.setPosition(adjustment)) {
						JOptionPane.showMessageDialog(null,
								"OL35SCHINDLER无法更新标签的位置数据！");
						return;
					}
					adjustment.setName("OL35SCHINDLERCN");
					adjustment.setLeft(Double.parseDouble(_OL35SCHINDLERCN_lef_str));
					adjustment.setTop(Double.parseDouble(_OL35SCHINDLERCN_top_str));
					System.out.println("_OL35SCHINDLERCN_top_str:" + _OL35SCHINDLERCN_top_str);
					System.out.println("_OL35SCHINDLERCN_lef_str:" + _OL35SCHINDLERCN_lef_str);
					if (!sd.setPosition(adjustment)) {
						JOptionPane.showMessageDialog(null,
								"OL35SCHINDLERCN无法更新标签的位置数据！");
						return;
					}

					// adjustment.setName("OL35CN");
					// adjustment.setLeft(Double.parseDouble(OL35CN_lef_str));
					// adjustment.setTop(Double.parseDouble(OL35CN_top_str));
					// if (!sd.setPosition(adjustment)) {
					// JOptionPane.showMessageDialog(null,
					// "OL35CN无法更新标签的位置数据！");
					// return;
					// }
					// adjustment.setName("1018300E");
					// adjustment.setLeft(Double.parseDouble(_1018300E_lef_str));
					// adjustment.setTop(Double.parseDouble(_1018300E_top_str));
					// if (!sd.setPosition(adjustment)) {
					// JOptionPane.showMessageDialog(null,
					// "1018300E无法更新标签的位置数据！");
					// return;
					// }
					// adjustment.setName("1018300");
					// adjustment.setLeft(Double.parseDouble(_1018300_lef_str));
					// adjustment.setTop(Double.parseDouble(_1018300_top_str));
					// if (!sd.setPosition(adjustment)) {
					// JOptionPane.showMessageDialog(null,
					// "1018300无法更新标签的位置数据！");
					// return;
					// }

					JOptionPane.showMessageDialog(null, "标签的位置数据已经更新！");
					dispose();//关闭页面
				} catch (NumberFormatException e1) {
					// e1.printStackTrace();
					JOptionPane.showMessageDialog(null, "您的输入不正确！");
				} catch (Exception e2) {
					e2.printStackTrace();
					JOptionPane.showMessageDialog(null, e2.getMessage());
				}
			}
		});
		button.setBounds(260, 321, 65, 23);
		getContentPane().add(button);

		JButton button_1 = new JButton("\u91CD\u7F6E");// 重置
		button_1.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent e) {
				// 重置
				 _80340E_top.setText("0");
				 _80340E_left.setText("0");
				 _80340_top.setText("0");
				 _80340_left.setText("0");
				// _900540E_top.setText("0");
				// _900540E_left.setText("0");
				// _900540_top.setText("0");
				// _900540_left.setText("0");
				_80420_top.setText("0");
				_80420_left.setText("0");
				_SGB_top.setText("0");
				_SGB_left.setText("0");
				_SGB05_top.setText("0");
				_SGB05_left.setText("0");
				_SGB05CN_top.setText("0");
				_SGB05CN_left.setText("0");
				_OL35SCHINDLER_top.setText("0");
				_OL35SCHINDLER_left.setText("0");
				_OL35SCHINDLERCN_top.setText("0");
				_OL35SCHINDLERCN_left.setText("0");
				// OL35CN_top.setText("0");
				// OL35CN_left.setText("0");
				// _1018300E_top.setText("0");
				// _1018300E_left.setText("0");
				// _1018300_top.setText("0");
				// _1018300_left.setText("0");

			}
		});
		button_1.setBounds(139, 321, 65, 23);
		getContentPane().add(button_1);

		JLabel label_4 = new JLabel("\u63A7    \u4EF6");// 控 件
		label_4.setHorizontalAlignment(SwingConstants.CENTER);
		label_4.setFont(new Font("宋体", Font.PLAIN, 12));
		label_4.setBounds(33, 10, 75, 15);
		getContentPane().add(label_4);

		JSeparator separator = new JSeparator();
		separator.setBounds(10, 35, 374, 9);
		getContentPane().add(separator);

		 JLabel lble = new
		 JLabel("Ol100\u82F1\u6587\uFF1A");//80340英文标签：
		 lble.setFont(new Font("宋体", Font.PLAIN, 12));
		 lble.setBounds(32, 48, 95, 15);
		 getContentPane().add(lble);
		
		 _80340E_top = new JTextField();
		 _80340E_top.setText("0");
		 _80340E_top.setHorizontalAlignment(SwingConstants.CENTER);
		 _80340E_top.setColumns(10);
		 _80340E_top.setBounds(138, 45, 66, 21);
		 getContentPane().add(_80340E_top);
		
		 _80340E_left = new JTextField();
		 _80340E_left.setText("0");
		 _80340E_left.setHorizontalAlignment(SwingConstants.CENTER);
		 _80340E_left.setColumns(10);
		 _80340E_left.setBounds(259, 45, 66, 21);
		 getContentPane().add(_80340E_left);
		//
		 JSeparator separator_1 = new JSeparator();
		 separator_1.setBounds(10, 302, 374, 9);
		 getContentPane().add(separator_1);
		
		 JLabel lblOl_3 = new
		 JLabel("OL100\u4E2D\u6587\uFF1A");//80340中文标签：
		 lblOl_3.setFont(new Font("宋体", Font.PLAIN, 12));
		 lblOl_3.setBounds(32, 77, 95, 15);
		 getContentPane().add(lblOl_3);
		
		 _80340_top = new JTextField();
		 _80340_top.setText("0");
		 _80340_top.setHorizontalAlignment(SwingConstants.CENTER);
		 _80340_top.setColumns(10);
		 _80340_top.setBounds(137, 76, 66, 21);
		 getContentPane().add(_80340_top);
		
		 _80340_left = new JTextField();
		 _80340_left.setText("0");
		 _80340_left.setHorizontalAlignment(SwingConstants.CENTER);
		 _80340_left.setColumns(10);
		 _80340_left.setBounds(259, 78, 66, 21);
		 getContentPane().add(_80340_left);
		//
		// JLabel lblOl = new
		// JLabel("OL35\u82F1\u6587\u6807\u7B7E\uFF1A");//OL35英文标签：
		// lblOl.setFont(new Font("宋体", Font.PLAIN, 12));
		// lblOl.setBounds(33, 106, 110, 15);
		// getContentPane().add(lblOl);
		//
		// _900540E_top = new JTextField();
		// _900540E_top.setText("0");
		// _900540E_top.setHorizontalAlignment(SwingConstants.CENTER);
		// _900540E_top.setColumns(10);
		// _900540E_top.setBounds(139, 107, 66, 21);
		// getContentPane().add(_900540E_top);
		//
		// _900540E_left = new JTextField();
		// _900540E_left.setText("0");
		// _900540E_left.setHorizontalAlignment(SwingConstants.CENTER);
		// _900540E_left.setColumns(10);
		// _900540E_left.setBounds(259, 109, 66, 21);
		// getContentPane().add(_900540E_left);
		//
		// JLabel label_3 = new
		// JLabel("900540\u4E2D\u6587\u6807\u7B7E\uFF1A");//900540中文标签：
		// label_3.setFont(new Font("宋体", Font.PLAIN, 12));
		// label_3.setBounds(33, 141, 110, 15);
		// getContentPane().add(label_3);
		//
		// _900540_top = new JTextField();
		// _900540_top.setText("0");
		// _900540_top.setHorizontalAlignment(SwingConstants.CENTER);
		// _900540_top.setColumns(10);
		// _900540_top.setBounds(138, 138, 66, 21);
		// getContentPane().add(_900540_top);
		//
		// _900540_left = new JTextField();
		// _900540_left.setText("0");
		// _900540_left.setHorizontalAlignment(SwingConstants.CENTER);
		// _900540_left.setColumns(10);
		// _900540_left.setBounds(259, 138, 66, 21);
		// getContentPane().add(_900540_left);

		JLabel lblOl_1 = new JLabel("OL35");// 80420中文标签：
		lblOl_1.setFont(new Font("宋体", Font.PLAIN, 12));
		lblOl_1.setBounds(33, 119, 95, 15);
		getContentPane().add(lblOl_1);

		_80420_top = new JTextField();
		_80420_top.setText("0");
		_80420_top.setHorizontalAlignment(SwingConstants.CENTER);
		_80420_top.setColumns(10);
		_80420_top.setBounds(139, 116, 66, 21);
		getContentPane().add(_80420_top);

		_80420_left = new JTextField();
		_80420_left.setText("0");
		_80420_left.setHorizontalAlignment(SwingConstants.CENTER);
		_80420_left.setColumns(10);
		_80420_left.setBounds(259, 115, 66, 21);
		getContentPane().add(_80420_left);

		// ----------------------SGBCN--------------------------------------

		JLabel lblsgb = new JLabel("\u901A\u529BSGB\u8C03\u6574");// SGB中文标签：
		lblsgb.setFont(new Font("宋体", Font.PLAIN, 12));
		lblsgb.setBounds(33, 147, 110, 15);
		getContentPane().add(lblsgb);

		_SGB_top = new JTextField();
		_SGB_top.setText("0");
		_SGB_top.setHorizontalAlignment(SwingConstants.CENTER);
		_SGB_top.setColumns(10);
		_SGB_top.setBounds(138, 144, 66, 21);
		getContentPane().add(_SGB_top);

		_SGB_left = new JTextField();
		_SGB_left.setText("0");
		_SGB_left.setHorizontalAlignment(SwingConstants.CENTER);
		_SGB_left.setColumns(10);
		_SGB_left.setBounds(259, 144, 66, 21);
		getContentPane().add(_SGB_left);

		// ----------------------SGB05--------------------------------------

		JLabel label_SGB05 = new JLabel("\u901A\u529B\u5B89\u5168\u94B3\u82F1\u6587");// SGB中文标签：
		label_SGB05.setFont(new Font("宋体", Font.PLAIN, 12));
		label_SGB05.setBounds(32, 206, 110, 15);
		getContentPane().add(label_SGB05);

		_SGB05_top = new JTextField();
		_SGB05_top.setText("0");
		_SGB05_top.setHorizontalAlignment(SwingConstants.CENTER);
		_SGB05_top.setColumns(10);
		_SGB05_top.setBounds(137, 206, 66, 21);
		getContentPane().add(_SGB05_top);

		_SGB05_left = new JTextField();
		_SGB05_left.setText("0");
		_SGB05_left.setHorizontalAlignment(SwingConstants.CENTER);
		_SGB05_left.setColumns(10);
		_SGB05_left.setBounds(258, 206, 66, 21);
		getContentPane().add(_SGB05_left);

		// -------------------SGB05CN-----------------------------------------

		JLabel label_SGB05CN = new JLabel("\u901A\u529B\u5B89\u5168\u94B3\u4E2D\u6587");// SGBCN中文标签：
		label_SGB05CN.setFont(new Font("宋体", Font.PLAIN, 12));
		label_SGB05CN.setBounds(33, 175, 110, 15);
		getContentPane().add(label_SGB05CN);

		_SGB05CN_top = new JTextField();
		_SGB05CN_top.setText("0");
		_SGB05CN_top.setHorizontalAlignment(SwingConstants.CENTER);
		_SGB05CN_top.setColumns(10);
		_SGB05CN_top.setBounds(138, 175, 66, 21);
		getContentPane().add(_SGB05CN_top);

		_SGB05CN_left = new JTextField();
		_SGB05CN_left.setText("0");
		_SGB05CN_left.setHorizontalAlignment(SwingConstants.CENTER);
		_SGB05CN_left.setColumns(10);
		_SGB05CN_left.setBounds(259, 173, 66, 21);
		getContentPane().add(_SGB05CN_left);

		// -------------------OL35迅达标签调整-----------------------------------------

		JLabel lblOl = new JLabel("OL35\u8FC5\u8FBE\u82F1\u6587");// SGBCN中文标签：
		lblOl.setFont(new Font("宋体", Font.PLAIN, 12));
		lblOl.setBounds(33, 237, 110, 15);
		getContentPane().add(lblOl);

		_OL35SCHINDLER_top = new JTextField();
		_OL35SCHINDLER_top.setText("0");
		_OL35SCHINDLER_top.setHorizontalAlignment(SwingConstants.CENTER);
		_OL35SCHINDLER_top.setColumns(10);
		_OL35SCHINDLER_top.setBounds(138, 237, 66, 21);
		getContentPane().add(_OL35SCHINDLER_top);

		_OL35SCHINDLER_left = new JTextField();
		_OL35SCHINDLER_left.setText("0");
		_OL35SCHINDLER_left.setHorizontalAlignment(SwingConstants.CENTER);
		_OL35SCHINDLER_left.setColumns(10);
		_OL35SCHINDLER_left.setBounds(259, 237, 66, 21);
		getContentPane().add(_OL35SCHINDLER_left);

		// -------------------OL35迅达中文标签调整-----------------------------------------

		JLabel lblOl_2 = new JLabel("OL35\u8FC5\u8FBE\u4E2D\u6587");// label_OL35SCHINDLERCN中文标签：
		lblOl_2.setFont(new Font("宋体", Font.PLAIN, 12));
		lblOl_2.setBounds(33, 268, 110, 15);
		getContentPane().add(lblOl_2);

		_OL35SCHINDLERCN_top = new JTextField();
		_OL35SCHINDLERCN_top.setText("0");
		_OL35SCHINDLERCN_top.setHorizontalAlignment(SwingConstants.CENTER);
		_OL35SCHINDLERCN_top.setColumns(10);
		_OL35SCHINDLERCN_top.setBounds(138, 268, 66, 21);
		getContentPane().add(_OL35SCHINDLERCN_top);

		_OL35SCHINDLERCN_left = new JTextField();
		_OL35SCHINDLERCN_left.setText("0");
		_OL35SCHINDLERCN_left.setHorizontalAlignment(SwingConstants.CENTER);
		_OL35SCHINDLERCN_left.setColumns(10);
		_OL35SCHINDLERCN_left.setBounds(259, 268, 66, 21);
		getContentPane().add(_OL35SCHINDLERCN_left);

		// _1018300_top = new JTextField();
		// _1018300_top.setText("0");
		// _1018300_top.setHorizontalAlignment(SwingConstants.CENTER);
		// _1018300_top.setColumns(10);
		// _1018300_top.setBounds(139, 258, 66, 21);
		// getContentPane().add(_1018300_top);
		//
		// OL35CN_left = new JTextField();
		// OL35CN_left.setText("0");
		// OL35CN_left.setHorizontalAlignment(SwingConstants.CENTER);
		// OL35CN_left.setColumns(10);
		// OL35CN_left.setBounds(259, 200, 66, 21);
		// getContentPane().add(OL35CN_left);
		//
		// _1018300E_top = new JTextField();
		// _1018300E_top.setText("0");
		// _1018300E_top.setHorizontalAlignment(SwingConstants.CENTER);
		// _1018300E_top.setColumns(10);
		// _1018300E_top.setBounds(138, 232, 66, 21);
		// getContentPane().add(_1018300E_top);
		//
		// _1018300E_left = new JTextField();
		// _1018300E_left.setText("0");
		// _1018300E_left.setHorizontalAlignment(SwingConstants.CENTER);
		// _1018300E_left.setColumns(10);
		// _1018300E_left.setBounds(259, 231, 66, 21);
		// getContentPane().add(_1018300E_left);
		//
		// OL35CN_top = new JTextField();
		// OL35CN_top.setText("0");
		// OL35CN_top.setHorizontalAlignment(SwingConstants.CENTER);
		// OL35CN_top.setColumns(10);
		// OL35CN_top.setBounds(138, 200, 66, 21);
		// getContentPane().add(OL35CN_top);
		//
		// JLabel lblOl_1 = new
		// JLabel("OL35\u8BC1\u4E66\u6807\u7B7E\uFF1A");//OL35证书标签：
		// lblOl_1.setFont(new Font("宋体", Font.PLAIN, 12));
		// lblOl_1.setBounds(33, 203, 110, 15);
		// getContentPane().add(lblOl_1);
		//
		// JLabel label_6 = new
		// JLabel("1018300\u82F1\u6587\u6807\u7B7E\uFF1A");//1018300英文标签：
		// label_6.setFont(new Font("宋体", Font.PLAIN, 12));
		// label_6.setBounds(33, 235, 110, 15);
		// getContentPane().add(label_6);
		//
		// JLabel label_7 = new
		// JLabel("1018300\u4E2D\u6587\u6807\u7B7E\uFF1A");//1018300中文标签：
		// label_7.setFont(new Font("宋体", Font.PLAIN, 12));
		// label_7.setBounds(33, 261, 110, 15);
		// getContentPane().add(label_7);
		//
		// _1018300_left = new JTextField();
		// _1018300_left.setText("0");
		// _1018300_left.setHorizontalAlignment(SwingConstants.CENTER);
		// _1018300_left.setColumns(10);
		// _1018300_left.setBounds(259, 258, 66, 21);
		// getContentPane().add(_1018300_left);

	}

	/**
	 * 更新标签字体大小。
	 */
	// private static void updateFontSize() {
	// SqliteDao sd = new SqliteDao();
	// String size = sd.getFontSize();
	// fontSize.setText(size);
	// }

	/**
	 * 更新标签位置信息。
	 */
	private static void updatePosition() {
		SqliteDao sd = new SqliteDao();
		List<Adjustment> list = sd.getPosition();
		if (!list.isEmpty()) {
			 _80340E_top.setText(list.get(0).getTop() + "");
			 _80340E_left.setText(list.get(0).getLeft() + "");
			 _80340_top.setText(list.get(1).getTop() + "");
			 _80340_left.setText(list.get(1).getLeft() + "");
			// _900540E_top.setText(list.get(2).getTop() + "");
			// _900540E_left.setText(list.get(2).getLeft() + "");
			// _900540_top.setText(list.get(3).getTop() + "");
			// _900540_left.setText(list.get(3).getLeft() + "");
			_80420_top.setText(list.get(5).getTop() + "");
			_80420_left.setText(list.get(5).getLeft() + "");
			_SGB_top.setText(list.get(8).getTop() + "");
			_SGB_left.setText(list.get(8).getLeft() + "");
			_SGB05_top.setText(list.get(9).getTop() + "");
			_SGB05_left.setText(list.get(9).getLeft() + "");
			_SGB05CN_top.setText(list.get(10).getTop() + "");
			_SGB05CN_left.setText(list.get(10).getLeft() + "");
			_OL35SCHINDLER_top.setText(list.get(11).getTop() + "");
			_OL35SCHINDLER_left.setText(list.get(11).getLeft() + "");
			_OL35SCHINDLERCN_top.setText(list.get(12).getTop() + "");
			_OL35SCHINDLERCN_left.setText(list.get(12).getLeft() + "");
			// OL35CN_top.setText(list.get(5).getTop() + "");
			// OL35CN_left.setText(list.get(5).getLeft() + "");
			// _1018300E_top.setText(list.get(6).getTop() + "");
			// _1018300E_left.setText(list.get(6).getLeft() + "");
			// _1018300_top.setText(list.get(7).getTop() + "");
			// _1018300_left.setText(list.get(7).getLeft() + "");
		}
	}
}
